/**
 * This file is part of JCueFile Creator.
 * 
 * JCueFile Creator is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * (at your option) any later version.
 * 
 * JCueFile Creator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 *  along with JCueFile Creator.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.jcuefile.cuefiles;

import java.util.HashMap;

import org.jcuefile.cuefiles.MP3.SingleMP3;

public class CueFileManager {
	
	final private static HashMap<String, Object> cueFile = new HashMap<String, Object>();
	private static String currentCueFile;
	
	/**
	 * Holds information about supported Cue Files.
	 * To add a CueFile simply add:
	 *   
	 *   cueFile.put("ModuleName", new ModuleName());
	 * 
	 * Where ModuleName would refer to the class name.
	 * 
	 * @String currentCueFile
	 */
	public CueFileManager(String currentCueFile) {
		CueFileManager.currentCueFile = currentCueFile;
		cueFile.put("SingleMP3", new SingleMP3());
	}
	
	final public static void newCueFile() {
		((SingleMP3) cueFile.get(currentCueFile)).newCueFile();
	}
	
	final public static void saveCueFile() {
		((SingleMP3) cueFile.get(currentCueFile)).saveCueFile();
	}
	
	final public static void loadCueFile() {
		((SingleMP3) cueFile.get(currentCueFile)).loadCueFile();
	}

	final public String getCueFileModule() {
		return CueFileManager.currentCueFile;
	}
}
